//
//  SLBaseWebViewController.h
//  ShopLeader
//
//  Created by 帅科 on 2020/5/25.
//  Copyright © 2020 ShopLeader. All rights reserved.
//

#import "SLBaseViewController.h"
#import "QSBaseWebView.h"

NS_ASSUME_NONNULL_BEGIN


typedef void(^SLChangeStatusBarStyleAction)(NSString*style , id param);

@interface SLBaseWebViewController : SLBaseViewController

@property (nonatomic ,copy) NSString* startPage; // 页面初始化

@property (nonatomic ,assign) int documentReadyState;

@property (nonatomic ,strong ,readonly) QSBaseWebView *webView;

// 改变状态栏样式
@property (nonatomic ,copy) SLChangeStatusBarStyleAction statusBarStyleChangeAction;


#pragma mark - 申明webview代理方法，供子类申明使用
- (WKNavigationActionPolicy)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction;
- (WKNavigationResponsePolicy)webView:(WKWebView *)webView decidePolicyForNavigationResponse:(WKNavigationResponse *)navigationResponse;
- (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(null_unspecified WKNavigation *)navigation;
- (void)webView:(WKWebView *)webView didReceiveServerRedirectForProvisionalNavigation:(null_unspecified WKNavigation *)navigation;
- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(null_unspecified WKNavigation *)navigation withError:(NSError *)error;
- (void)webView:(WKWebView *)webView didCommitNavigation:(null_unspecified WKNavigation *)navigation;
- (void)webView:(WKWebView *)webView didFinishNavigation:(null_unspecified WKNavigation *)navigation;
- (void)webView:(WKWebView *)webView didFailNavigation:(null_unspecified WKNavigation *)navigation withError:(NSError *)error;
- (void)webViewWebContentProcessDidTerminate:(WKWebView *)webView;

@end




NS_ASSUME_NONNULL_END
